import service from "../utils/request"

// 添加设施
export const addRequest = (data: any) => {
  return service.post("/admin/facility", data)
}

// 删除设施
export const delRequest = (id: any) => {
  return service.delete(`/admin/facility/${id}`)
}

// 编辑设施
export const editRequest = (data: any) => {
  return service.put("/admin/facility", data)
}

// 分页查询设施
export const pageRequest = (query: any) => {
  return service.get("/admin/facility/list", {
    params: query,
  })
}

// 获取所有设施分类
export const getAllCategoryRequest = () => {
  return service.get("/facility/categories")
}
